import {DIC} from "@/store/dictionary";

export const tableOption = {
  height: 'auto',
  calcHeight: 210,
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  border: true,
  index: true,
  addBtn: false,
  selection: true,
  indexLabel: "序号",
  column: [
    // {
    //   label: "账号",
    //   prop: "account",
    //   rules: [{
    //     required: true,
    //     message: "请输入账号",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "昵称",
      prop: "name",
      rules: [{
        required: true,
        message: "请输入昵称",
        trigger: "blur"
      }]
    },
    {
      label: "姓名",
      prop: "realName",
      search: true,
      rules: [{
        required: true,
        message: "请输入真实姓名",
        trigger: "blur"
      }]
    },
    // {
    //   label: "头像",
    //   prop: "avatar",
    //   type: 'upload',
    //   listType: 'picture-img',
    //   propsHttp: {
    //     home:'https://avuejs.com',
    //   },
    //   rules: [{
    //     required: true,
    //     message: "请输入头像",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "邮箱",
      prop: "email"
    },
    {
      label: "手机",
      prop: "phone"
    },
    {
      label: "生日",
      prop: "birthday"
    },
    {
      label: "性别",
      prop: "sex",
      type: "select",
      search: true,
      dicData: DIC.sex,
      rules: [{
        required: true,
        message: "请输入真实姓名",
        trigger: "blur"
      }]
    },
    // {
    //   label: "创建人",
    //   prop: "createUser",
    //   rules: [{
    //     required: true,
    //     message: "请输入创建人",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "创建时间",
      prop: "createTime",
      type: "date",
      display: false,
      format: "yyyy-MM-dd hh:mm:ss",
      valueFormat: "yyyy-MM-dd hh:mm:ss"
    },
    // {
    //   label: "修改人",
    //   prop: "updateUser",
    //   rules: [{
    //     required: true,
    //     message: "请输入修改人",
    //     trigger: "blur"
    //   }]
    // },
    // {
    //   label: "修改时间",
    //   prop: "updateTime",
    //   rules: [{
    //     required: true,
    //     message: "请输入修改时间",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "状态",
      prop: "status",
      type: "select",
      dicData: DIC.studentStatus,
      rules: [{
        required: true,
        message: "请输入状态",
        trigger: "blur"
      }]
    }
  ]
}

export const memberOption = {
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  tip: false,
  border: true,
  index: true,
  addBtn: false,
  selection: true,
  indexLabel: "序号",
  column: [
    {
      label: "姓名",
      prop: "realName",
      search: true,
      rules: [{
        required: true,
        message: "请输入真实姓名",
        trigger: "blur"
      }]
    },
    {
      label: "性别",
      prop: "sex",
      type: "select",
      search: true,
      dicData: DIC.sex
    },
    {
      label: "加入时间",
      prop: "joinTime",
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
    },
  ]
}

export const detailFormOption = {
  detail: true,
  column: [
    {
      label: "账号",
      prop: "account"
    },
    {
      label: "昵称",
      prop: "name"
    },
    {
      label: "姓名",
      prop: "realName"
    },
    {
      label: "头像",
      prop: "avatar"
    },
    {
      label: "邮箱",
      prop: "email"
    },
    {
      label: "手机",
      prop: "phone"
    },
    {
      label: "生日",
      prop: "birthday"
    },
    {
      label: "性别",
      prop: "sex",
      type: "select",
      dicData: DIC.sex
    },
    {
      label: "创建时间",
      prop: "createTime"
    },
    {
      label: "状态",
      prop: "status"
    }
  ]
}

export const detailTableOption = {
  label: '用户信息',
  searchShow: true,
  menu: false,
  align: "center",
  tip: false,
  index: true,
  border: true,
  addBtn: false,
  delBtn: false,
  editBtn: false,
  indexLabel: "序号",
  column: [
    {
      label: "课程名称",
      prop: "name",
      rules: [{
        required: true,
        message: "请输入课程名称",
        trigger: "blur"
      }]
    },
    {
      label: "教师名称",
      prop: "teacherRealName",
      rules: [{
        required: true,
        message: "请输入教师名称",
        trigger: "blur"
      }]
    },
    {
      label: "成员人数",
      prop: "memberNum",
      rules: [{
        required: true,
        message: "请输入成员人数",
        trigger: "blur"
      }]
    },
    {
      label: "创建人",
      prop: "createUser",
      rules: [{
        required: true,
        message: "请输入创建人",
        trigger: "blur"
      }]
    },
    {
      label: "状态",
      prop: "status",
      rules: [{
        required: true,
        message: "请输入状态",
        trigger: "blur"
      }]
    }
  ]
}
